setHasOptionsMenu

open fun setHasOptionsMenu(hasMenu: Boolean)(source)

Deprecated

This method is no longer needed when using a MenuProvider to provide a Menu to your activity, which replaces onCreateOptionsMenu as the recommended way to provide a consistent, optionally Lifecycle-aware, and modular way to handle menu creation and item selection.

Report that this fragment would like to participate in populating the options menu by receiving a call to onCreateOptionsMenu and related methods.

Parameters

hasMenu

If true, the fragment has menu items to contribute.